#============================== FPLT README ==============================#
# Discipline: Uso da Linguagem R para Analise de Dados em Ecologia - 2014
# R Function: Life Planning at Long Term. Date: May/2014
# Author: Amanda Rusiska Piovezani  <arpiovezani@usp.br>
#==========================================================================

#==============
# Description
#==============
A function of Life Planning at Long Term (fplt). This is not the calculation
of public or private retirement, instead, this function shows how could be
done a financial planning when you wish to receive a monthlly extra income
at the moment of the retirement. 

#=========
# Input
#=========
The values of: age (years) which should be considered as the beginning of
planning (argument 'b'), retirement age (argument 'c'), maximum monthly 
amount that you can save (argument 'max'), the required
monthly amount for receiving the end (argument 'a') and if available, the user
can pass the value already saved before this function calculation
(argument 'd').

#=========
# Output
#=========
Will print on the screen a text containing the values involved on function
calculation, that are:
- Age at beginning planing
- Age at retirement
- Value that should be saved monthly (in your currency) and the needed period
  for this deposit.
- Value that will be received monthly

#=========================
# Content of fplt package
#=========================
The 'README' file describes the object, input, output, how to execute the
function and one example.
The 'fplt.r' file contains the function code. 
The 'fplt.rd' file is the R Documentation

#===========
# Execution 
#===========
Note: Commands that should be run from the UNIX shell (e.g., bash or csh) are
prefixed with a '$' character. Commands that should be run from either R script
or at the R interactive shell are prefixed with a '>' character.

1) Inside fplt directory, start a R session:
$ R

2) Make load of the function:
> source("fplt.r")

3) Execute the function passing your arguments:
example 1:
> fplt(a=3000,b=27,c=65)

4) Output from example 1:
Your Life Long Term Planning includes:
 - Age at beginning planing: 27 
 - Age at retirement: 65 
 - Value that should be saved monthly (in your currency): 394.74  for a period
   of 38 years
 - Value that will be received monthly (in your currency) on retirement: 3000

#========================================= README END =========================================#